import request from '@/utils/request'

// 查询公告列表
export function listMessage(query) {
  return request({
    url: '/appNews/pageData',
    method: 'get',
    params: query
  })
}

// 查询公告详细
export function getAppNewsDetail(data) {
  return request({
    url: '/appNews/detail',
    method: 'get',
    params: data
  })
}

// 新增公告
export function addAppNews(data) {
  return request({
    url: '/appNews/add',
    method: 'post',
    data: data
  })
}

// 修改公告
export function updateAppNews(data) {
  return request({
    url: '/appNews/update',
    method: 'post',
    data: data
  })
}

// 删除公告
export function delAppNews(noticeId) {
  return request({
    url: '/appNews/del/' + noticeId,
    method: 'delete'
  })
}